/* -*- c++ -*-
   llvmir-systems.h - GCC headers for use in LLVMIR
   Copyright (C) 2011 Matthew Wahab <mwb.cde@gmail.com>

   This file is part of GCC-LLVMIR.

   GCC-LLVMIR is free software; you can redistribute it and/or modify it under
   the terms of the GNU General Public License as published by the Free
   Software Foundation; either version 3, or (at your option) any later
   version.

   GCC-LLVMIR is distributed in the hope that it will be useful, but WITHOUT ANY
   WARRANTY; without even the implied warranty of MERCHANTABILITY or
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   for more details.

   You should have received a copy of the GNU General Public License
   along with GCC-LLVMIR; see the file COPYING3.  If not see
   <http://www.gnu.org/licenses/>.  */

/* This is a C++ file. */

#ifndef LLVMIR_SYSTEM_H
#define LLVMIR_SYSTEM_H

/*
 * Headers that solve C++/C compatibility problems in the GCC
 * headers. Must be included before the GCC headers.
 */


#if defined(__cplusplus) && !defined(ENABLE_BUILD_WITH_CXX)
/* Arbitary precision libraries */
#include <gmp.h>
#include <mpfr.h>
#endif /* ENABLE_BUILD_WITH_CXX */


/* 
 * GCC headers, with appropriate linkage. 
 */

#include "config.h"

#if defined(__cplusplus) && !defined(ENABLE_BUILD_WITH_CXX)
extern "C"
{
#endif /* ENABLE_BUILD_WITH_CXX */

#include "system.h"
#include "ansidecl.h"
#include "coretypes.h"

#include "diagnostic-core.h"
#include "diagnostic.h"
#include "input.h"

#include "opts.h"
#include "ggc.h"
#include "toplev.h"
#include "debug.h"
#include "options.h"
#include "flags.h"

#include "tree.h"
#include "tree-iterator.h"
#include "gimple.h"

#include "cgraph.h"
#include "convert.h"
#include "langhooks.h"
#include "langhooks-def.h"

#include "intl.h"

#include "except.h"
#include "target.h"

#include "machmode.h"

  /* #ifndef NDEBUG */
#include "tree-dump.h"
  /* #endif */

#if defined(__cplusplus) && !defined(ENABLE_BUILD_WITH_CXX)
}
#endif /* ENABLE_BUILD_WITH_CXX */

/* C linkage specifier, following GO frontend. */
#if defined(__cplusplus) && defined(ENABLE_BUILD_WITH_CXX)
#define LLVMIR_EXTERN_C
#else
#define LLVMIR_EXTERN_C extern "C"
#endif /* ENABLE_BUILD_WITH_CXX */

/* Record whether this is GCC is the released version or the trunk */
#if (BUILDING_GCC_MINOR > 6)
#define LLVMIR_GCC_TRUNK (true)
#endif

/* End of file */
#endif /* LLVMIR_SYSTEM_H */
